import $http from './httpXin.js';

//   url为接口地址   params为接口参数   第3个参数是去选择第几个api  第4个参数是否开启loading

export function GetStoreGoodsListApi(params) { //商品列表
    let url = '/backend/api/v1/store/goods/list'
    return $http.post(url, params,1)
}

export function GetStoreGoodsDetailsApi(params) { // 商品详情
    let url = `/backend/api/v1/store/goods/${params}`
    return $http.get(url, params,1)
}


export function GetStoreUserHomeApi(params) { // index页面查询公司列表
  let url = `/api/store/v1/user/home`
  return $http.get(url, params,1)
}

export function GetStoreHomeApi(params) { // 查询当前公司列表的某一个公司
  let url = '/api/store/v1/store/home'
  return $http.post(url, params,1)
}


export function saleList(params) {   //查看销售列表
    let url =  '/backend/api/v1/sale/list'
    return $http.post(url, params,1)
}


export function salesCreate(params) {   //创建销售
  let url =  '/backend/api/v1/sale/create'
  return $http.post(url, params,1)
}

export function deleteSales(params) {   //删除销售
  let url =  '/backend/api/v1/sale/delete'
  return $http.post(url, params,1)
}

export function updateSales(params) {   //修改销售团队
  let url =  '/backend/api/v1/sale/update'
  return $http.post(url, params,1)
}

export function GetRecordApi(params) { // 邀请记录
  let url = `/backend/api/v1/sale/record`
  return $http.post(url, params,1)
}

export function GetCouponScanApi(params) { // 代金券核销详情
  let url = `/api/order/v1/coupon/scan/code`
  return $http.post(url, params,2)
}

export function GetCouponVifiryApi(params) { // 代金券核销
  console.log(params,"params")
  let url = `/api/order/v1/coupon/verify`
  return $http.post(url, params,2)
}


export function businessWalletInfoApi(params) { // 钱包
  let url = `/api/store/v1/business/wallet/info`
  return $http.post(url, params,2)
}

export function GetWalletInfoApi(params) { // 我的钱包
  let url = `/api/wallet/v1/walletInfo`
  return $http.post(url, params,3)
}


export function GetBankInfoApi(params) { // 根据银行卡号获取银行卡
  let url = `/api/wallet/v1/bankInfo`
  return $http.post(url, params,3)
}


export function GetIncomeDetailsApi(params) { // 收支明细
  let url = `/api/wallet/v1/incomeDetails`
  return $http.post(url, params,3)
}

export function GetBindBankCardApi(params) { // 钱包绑定银行卡
  let url = `/api/wallet/v1/bindBankCard`
  return $http.post(url, params,3)
}

export function GetWithdrawApi(params) { // 钱包提现
  let url = `/api/wallet/v1/withdraw`
  return $http.post(url, params,3)
}

export function GetSendCaptchaApi(params) { //发送验证码
  let url = '/api/sms/v1/send/captcha'
  return $http.post(url, params,3)
}



export function apiorderUserDetail(params) { // 订单详情
  let url = `/api/order/v1/user/detail`
  return $http.post(url, params,2)
}

export function apiorderUserPayVerify(params) { // 买单核销
  let url = `/api/order/v1/user/pay/verify`
  return $http.post(url, params,2)
}


export function apiStoreGoodsAdd(params) { // 新增买单
  let url = `/backend/api/v1/store/goods/add`
  return $http.post(url, params,1)
}

export function apiStoreGoodsList(params) { // 买单列表
  let url = `/backend/api/v1/store/goods/list`
  return $http.post(url, params,1)
}


export function addStoreGoods(params) { //新增代金券 团购
  let url = `/backend/api/v1/order/couponAdd`
  return $http.post(url, params,1)
}

export function orderCouponPages(params) { // 团购列表
  let url = `/backend/api/v1/order/couponPages`
  return $http.post(url, params,1)
}


// 团购详情
export function orderCouponDetail(params) {
  let url = `/backend/api/v1/order/couponDetail`
  return $http.post(url, params,1)
}


export function couponUpdate(params) { //修改代金券 团购
  let url = `/backend/api/v1/order/couponUpdate`
  return $http.post(url, params,1)
}

export function couponOperation(params) { //团购商家操作
  let url = `/backend/api/v1/order/couponOperation`
  return $http.post(url, params,1)
}







